package com.csun.cmny.provider.dao;

import com.csun.cmny.provider.model.dto.OldManBirthdayDto;
import com.csun.cmny.provider.model.vo.OldmanRpcVo;
import com.csun.cmny.provider.pojo.BirthdayRemind;
import com.csun.cmny.provider.pojo.OldmanCheckIn;
import com.csun.cmny.provider.pojo.OldmanInfo;
import com.csun.cmny.provider.pojo.SexCountVo;
import com.csun.cmny.provider.vo.CheckinUserInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface OldmanCheckInMapper {
    int deleteByPrimaryKey(Integer oldmanId);

    int insert(OldmanCheckIn record);

    int insertSelective(OldmanCheckIn record);

    OldmanCheckIn selectByPrimaryKey(Integer oldmanId);

    int updateByPrimaryKeySelective(OldmanCheckIn record);

    int updateByPrimaryKey(OldmanCheckIn record);
    /**
     * 查询老人基本信息及入院信息
     * author:liqian
     * date:2018-11-16 16:55
     */
    CheckinUserInfoVo selectByOid(Integer oldmanId);
    /**
     * 查询入院老人列表
     * author:liqian
     * date:2018-11-22 17:45
     */
    List<Map<String,Object>> showAll(Map<String,Object> queryMap);

    /**
     * 查询入院老人列表
     * 因cn_omc_oldman_checkin表废弃,修改查询语句
     * author:chenzheng
     * date:2019-09-11
     */
    List<Map<String,Object>> showAllOld(Map<String,Object> queryMap);

    /**
     * 查询已入住老人的基本信息
     * author:郑平
     * date:2018-11-29 11:01
     */
    List<OldmanInfo> showCheckInOldManInfo(Map<String,Object> queryMap);

    List<SexCountVo> getSexAnalysis(Long homeId);

    List<SexCountVo> gerOldTypeAnalysis(Long homeId);

    SexCountVo getOldmanNalysis(Map map);

    List<BirthdayRemind> getOldBirthdayRemind(Map<String,Object> queryMap);

    List<OldmanRpcVo> getCheckinByHomeId(Integer homeId);

    /**
     * select count by set meal id
     *
     * @param setMealId set meal id
     *
     * @return  set meal id
     */
    int selectCountBySetMealId(Integer setMealId);

    int outByOldmanId(@Param("oldmanId")Integer oldmanId);

    List<CheckinUserInfoVo> selectGroupId();

    List<BirthdayRemind> getNewOldBirthdayRemind(OldManBirthdayDto oldManBirthdayDto);
}